package com.tyut.rxtnongyespringboot.controller;

import com.tyut.rxtnongyespringboot.bean.User;
import com.tyut.rxtnongyespringboot.service.impl.UserServiceimpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("User")
public class UserController {
    @Autowired
    private UserServiceimpl userservice;




    @GetMapping("/login")
    public String login() {


        return "login";
    }
    @GetMapping("/{user_name}")
    public User findbyId(@PathVariable String user_name) {
        return userservice.findByName(user_name);
    }


}
